Optimal. Leaf size=26 \[ -\frac {i c (a+i a \tan (e+f x))^m}{f m} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {3603, 3568, 32}
\begin {gather*} -\frac {i c (a+i a \tan (e+f x))^m}{f m} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 3568
Rule 3603
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x)) \, dx &=(a c) \int \sec ^2(e+f x) (a+i a \tan (e+f x))^{-1+m} \, dx\\ &=-\frac {(i c) \text {Subst}\left (\int (a+x)^{-1+m} \, dx,x,i a \tan (e+f x)\right )}{f}\\ &=-\frac {i c (a+i a \tan (e+f x))^m}{f m}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(95\) vs. \(2(26)=52\).
time = 1.97, size = 95, normalized size = 3.65 \begin {gather*} -\frac {i 2^m c \left (e^{i f x}\right )^m \left (\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}\right )^m \sec ^{-m}(e+f x) (\cos (f x)+i \sin (f x))^{-m} (a+i a \tan (e+f x))^m}{f m} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 25, normalized size = 0.96
method | result | size |
derivativedivides | \(-\frac {i c \left (a +i a \tan \left (f x +e \right )\right )^{m}}{f m}\) | \(25\) |
default | \(-\frac {i c \left (a +i a \tan \left (f x +e \right )\right )^{m}}{f m}\) | \(25\) |
norman | \(-\frac {i c \,{\mathrm e}^{m \ln \left (a +i a \tan \left (f x +e \right )\right )}}{f m}\) | \(27\) |
risch | \(-\frac {i c \,{\mathrm e}^{\frac {m \left (-i \pi \mathrm {csgn}\left (i {\mathrm e}^{2 i \left (f x +e \right )}\right )^{3}+2 i \pi \mathrm {csgn}\left (i {\mathrm e}^{2 i \left (f x +e \right )}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{i \left (f x +e \right )}\right )-i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 i \left (f x +e \right )}\right ) \mathrm {csgn}\left (i {\mathrm e}^{i \left (f x +e \right )}\right )^{2}+i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 i \left (f x +e \right )}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2}-i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 i \left (f x +e \right )}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right ) \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )-i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{3}+i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2} \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )+i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right ) \mathrm {csgn}\left (\frac {i a \,{\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2}-i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right ) \mathrm {csgn}\left (\frac {i a \,{\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right ) \mathrm {csgn}\left (i a \right )-i \pi \mathrm {csgn}\left (\frac {i a \,{\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{3}+i \pi \mathrm {csgn}\left (\frac {i a \,{\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}\right )^{2} \mathrm {csgn}\left (i a \right )+4 \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )-2 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )+2 \ln \left (2\right )+2 \ln \left (a \right )\right )}{2}}}{f m}\) | \(511\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.54, size = 25, normalized size = 0.96 \begin {gather*} -\frac {i \, a^{m} c {\left (i \, \tan \left (f x + e\right ) + 1\right )}^{m}}{f m} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.12, size = 38, normalized size = 1.46 \begin {gather*} -\frac {i \, c \left (\frac {2 \, a e^{\left (2 i \, f x + 2 i \, e\right )}}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{m}}{f m} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 71 vs. \(2 (20) = 40\).
time = 0.22, size = 71, normalized size = 2.73 \begin {gather*} \begin {cases} x \left (- i c \tan {\left (e \right )} + c\right ) & \text {for}\: f = 0 \wedge m = 0 \\c x - \frac {i c \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} & \text {for}\: m = 0 \\x \left (i a \tan {\left (e \right )} + a\right )^{m} \left (- i c \tan {\left (e \right )} + c\right ) & \text {for}\: f = 0 \\- \frac {i c \left (i a \tan {\left (e + f x \right )} + a\right )^{m}}{f m} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.17, size = 23, normalized size = 0.88 \begin {gather*} -\frac {i \, {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m} c}{f m} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.17, size = 46, normalized size = 1.77 \begin {gather*} -\frac {c\,{\left (\frac {a\,\left (2\,{\cos \left (e+f\,x\right )}^2+\sin \left (2\,e+2\,f\,x\right )\,1{}\mathrm {i}\right )}{2\,{\cos \left (e+f\,x\right )}^2}\right )}^m\,1{}\mathrm {i}}{f\,m} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________